<?php

namespace App\Http\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class PmProjectReportResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  Request              $request
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'project_id' => $this->project_id,
            'project_name' => $this->project_name,
            'report_type' => $this->report_type,
            'report_type_text' => $this->report_type_text, //TODO
            'execute_period' => $this->execute_period,
            'execute_period_text' => $this->execute_period_text, //TODO
            'previous_summary' => $this->previous_summary,
            'future_plan' => $this->future_plan,
            'progress_images' => $this->progress_images, //TODO
            'stage_report_files' => $this->stage_report_files, //TODO
            'creator' => $this->creator,
            'creator_text' => $this->creator_text,
            'created_at' => $this->created_at->toDateTimeString(),
            'updated_at' => $this->updated_at->toDateTimeString(),
        ];
    }
}
